home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / vim / src / unix.h < prev    next >
C/C++ Source or Header  |  1995-03-09  |  3KB  |  128 lines

  1. /* vi:ts=4:sw=4
  2.  *
  3.  * VIM - Vi IMproved        by Bram Moolenaar
  4.  *
  5.  * Read the file "credits.txt" for a list of people who contributed.
  6.  * Read the file "uganda.txt" for copying and usage conditions.
  7.  */
  8.  
  9. /*
  10.  * Unix system-dependent filenames
  11.  */
  12.  
  13. #ifndef SYSEXRC_FILE
  14. # define SYSEXRC_FILE    "$HOME/.exrc"
  15. #endif
  16.  
  17. #ifndef SYSVIMRC_FILE
  18. # define SYSVIMRC_FILE    "$HOME/.vimrc"
  19. #endif
  20.  
  21. #ifndef EXRC_FILE
  22. # define EXRC_FILE        ".exrc"
  23. #endif
  24.  
  25. #ifndef VIMRC_FILE
  26. # define VIMRC_FILE        ".vimrc"
  27. #endif
  28.  
  29. #ifndef DEFVIMRC_FILE
  30. # define DEFVIMRC_FILE    "/usr/local/etc/vimrc"
  31. #endif
  32.  
  33. #ifndef VIM_HLP
  34. # define VIM_HLP        "/usr/local/lib/vim.hlp"
  35. #endif
  36.  
  37. #ifndef BACKUPDIR
  38. # define BACKUPDIR        "$HOME"
  39. #endif
  40.  
  41. #ifndef DEF_DIR
  42. # define DEF_DIR        "/tmp"
  43. #endif
  44.  
  45. #define TMPNAME1        "/tmp/viXXXXXX"
  46. #define TMPNAME2        "/tmp/voXXXXXX"
  47. #define TMPNAMELEN        15
  48.  
  49. #ifndef MAXMEM
  50. # define MAXMEM            512            /* use up to 512Kbyte for buffer */
  51. #endif
  52. #ifndef MAXMEMTOT
  53. # define MAXMEMTOT        2048        /* use up to 2048Kbyte for Vim */
  54. #endif
  55.  
  56. #define BASENAMELEN        (MAXNAMLEN - 5)
  57.  
  58. #define stricmp vim_stricmp
  59.  
  60. /*
  61.  * prototypes for functions not in unix.c
  62.  */
  63. #ifdef SCO
  64. int        chmod __ARGS((const char *, mode_t));
  65. #endif
  66. #if !defined(linux) && !defined(__NeXT) && !defined(M_UNIX) && !defined(ISC) && !defined(USL) && !defined(SOLARIS)
  67. int        remove __ARGS((const char *));
  68. /*
  69.  * If you get an error message on "const" in the lines above, try
  70.  * adding "-Dconst=" to the options in the makefile.
  71.  */
  72.  
  73. # if 0        /* should be in unistd.h */
  74. void    sleep __ARGS((int));
  75. # endif
  76.  
  77. int        rename __ARGS((const char *, const char *));
  78. #endif
  79.  
  80. int        stricmp __ARGS((char *, char *));
  81.  
  82. /* memmove is not present on all systems, use our own version or bcopy */
  83. #if !defined(SCO) && !defined(SOLARIS) && !defined(AIX) && !defined(UTS4) && !defined(USL) && !defined(MIPS) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(linux) && !defined(UNISYS)
  84. # ifdef SYSV_UNIX
  85. #   define MEMMOVE
  86. void *memmove __ARGS((void *, void *, int));
  87. # else
  88. #  define memmove(to, from, len) bcopy(from, to, len)
  89. #  if !(defined(hpux) && defined(__STDC__))
  90. #   ifdef linux
  91. extern void bcopy __ARGS((const void *, void *, int));
  92. #   else
  93. extern void bcopy __ARGS((char *, char *, int));
  94. #   endif
  95. #  endif
  96. # endif
  97. #endif
  98.  
  99. #if defined(BSD_UNIX) && !defined(__STDC__)
  100. # define strchr(ptr, c)            index((ptr), (c))
  101. # define strrchr(ptr, c)        rindex((ptr), (c))
  102. #endif
  103.  
  104. #ifdef BSD_UNIX
  105. # define memset(ptr, c, size)    bsdmemset((ptr), (c), (size))
  106. char *bsdmemset __ARGS((char *, int, long));
  107. #endif
  108.  
  109. /*
  110.  * Most unixes don't have these in include files.
  111.  * If you get a "redefined" error, delete the offending line.
  112.  */
  113. #if !defined(__NetBSD__) && !defined(__FreeBSD__)
  114.   extern int    ioctl __ARGS((int, int, ...));
  115. #endif
  116. extern int    fsync __ARGS((int));
  117. extern char *getwd __ARGS((char *));
  118. #if !defined(__NetBSD__) && !defined(__FreeBSD__)
  119. # ifdef linux
  120.    extern void bzero __ARGS((void *, int));
  121. # else
  122.    extern void bzero __ARGS((char *, int));
  123. # endif
  124. #endif
  125. #if defined(system_that_does_not_have_access_in_an_include_file)
  126. extern int access __ARGS((char *, int));
  127. #endif
  128.